<?php

class IndexController extends Zend_Controller_Action
{

    public function init()
    {
        /* Initialize action controller here */
        if ( !Zend_Auth::getInstance()->hasIdentity() ) {
            return $this->_helper->redirector->goToRoute( array('controller' => 'auth'), null, true);
        }
        
        $usuario = Zend_Auth::getInstance()->getIdentity();
        $this->view->usuario = $usuario;
    }

    public function indexAction()
    {
        $usuario = Zend_Auth::getInstance()->getIdentity();
        $this->view->usuario = $usuario;        
    }
}